Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MKLocalSearch to the Location pane #180

Merged
merged 5 commits into from
Dec 6, 2023

Conversation

markerpen
Copy link
Contributor

@markerpen markerpen commented Nov 30, 2023

  • Replaces the two coordinate textfields in the Location pane with a single search bar.
  • The search bar can perform MKLocalSearch lookups and center the map on the results.
  • The search bar can also detect pasted-in coordinates (latitude, longitude) and center the map on those coordinates.
  • Added a Copy button alongside the coordinates.
Screen.Recording.2023-11-30.at.01.00.06.mp4


/// Called if `MKLocalSearchCompleter` encounters an error
func completer(_ completer: MKLocalSearchCompleter, didFailWithError error: Error) {
print(error)

This comment was marked as resolved.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MKLocalSearchCompleter is an old delegate-based protocol, so I don't think it throws (I could be wrong, I don't spend much time with delegates any more) - it just sends the Error to the didFailWithError function. Suggestions to improve?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No suggestion, I didn't know about MKLocalSearchCompleter, it was just for know why you did that, thanks.

@Harry-KNIGHT
Copy link
Contributor

Really great improvement btw thank you !

@twostraws
Copy link
Owner

This is fantastic – thank you!

@twostraws twostraws merged commit f81be89 into twostraws:main Dec 6, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants